package logic

import (
	"0227zk/common/proto/user"
	"0227zk/service/server"
	"context"
)

type ServiceUser struct {
	user.UnimplementedUserServer
}

func (s ServiceUser) Login(ctx context.Context, in *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.Login(in)
	if err != nil {
		return nil, err
	}
	return login, nil

}
func (s ServiceUser) Register(ctx context.Context, in *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.Register(in)
	if err != nil {
		return nil, err
	}
	return login, nil

}
func (s ServiceUser) UserList(ctx context.Context, in *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.UserList()
	if err != nil {
		return nil, err
	}
	return login, nil

}
